#include "StdAfx.h"
#include "t_Message.h"


t_Message::t_Message(t_MessageRecipient* MessageRecipient, int Type, clock_t tm)
{
	this->type = Type;
	this->p_Clock = tm;
	this->p_MessageRecipient = MessageRecipient;
	this->p_MessageQueue = NULL;
	this->msg = 0;
}

t_Message::t_Message(t_MessageRecipient* MessageRecipient, int Type, int msg, clock_t tm)
{
	this->type = Type;
	this->p_Clock = tm;
	this->msg = msg;
	this->p_MessageRecipient = MessageRecipient;
	this->p_MessageQueue = NULL;
}


t_Message::t_Message(const t_Message & p_Message)
{
	this->type = p_Message.type;
	this->msg = p_Message.msg;
	this->p_Clock = p_Message.p_Clock;
	this->p_MessageRecipient = p_Message.p_MessageRecipient;
	this->p_MessageQueue = p_Message.p_MessageQueue;
}

t_Message::~t_Message(void)
{
}

void t_Message::operator =(const t_Message & p_Message)
{
	this->type = p_Message.type;
	this->msg = p_Message.msg;
	this->p_Clock = p_Message.p_Clock;
	this->p_MessageRecipient = p_Message.p_MessageRecipient;
	this->p_MessageQueue = p_Message.p_MessageQueue;
}

bool t_Message::operator < (const t_Message& p_Message)
{
	return this->p_Clock < p_Message.p_Clock;
}

/*
int t_Message::GetType()
{
	return type;
}
*/